<template>
  <div>
    <div class="d1">
      <div class="d11">
        <p>{{ title }}</p>
        <img :src="`/img/${picture}`" alt="" />
      </div>
      <ul class="u1" v-if="data">
        <li v-for="p in data" :key="p.tid" @click="goCaipuzuofa(p)">
          {{ p.typename }}
        </li>
      </ul>
    </div>
  </div>
</template>

<script>

export default {

  props: ["title", "picture", "data"],
  methods: {
    goCaipuzuofa(p) {
      this.$router.push({
        name: "caipuzuofa",
        params: {
          id: p.tid,
          zuofa: p.zuofa,
        },
      });
    },
  },
  mounted() {},
};
</script>

<style lang="scss" scoped>
</style>
<style scoped>
.d1 {
  width: 95%;
  margin: 0 auto;
}
.d1 .d11 {
  height: 40px;
  padding-left: 10px;
  background-color: #f2f0ee;
  display: flex;
  justify-content: space-between;
  height: 100%;
}
.d1 .d11 p {
  line-height: 40px;
  margin-top: 0px;
  margin-bottom: 0px;
}
.d1 .d11 img {
  display: inline-block;
  height: 30px;
  line-height: 40px;
  padding-right: 10px;
  padding-top: 5px;
}
.d1 .u1 {
  width: 100%;
  display: flex;
  /* justify-content: space-between; */
  flex-wrap: wrap;
  direction: none;
  font-size: 15px;
  align-content: flex-start;
}
.d1 .u1 li {
  width: 16%;
  margin-top: 10px;
  margin-bottom: 10px;
}
</style>